👉 Public Key Cryptography (PGP) relies on number theory, particularly the properties of prime numbers and modular arithmetic, to enable secure communication. At its core, PGP uses the difficulty of factoring large composite numbers into their prime factors—a problem rooted in number theory—to create a public-private key pair. The public key, derived from a large product of two distinct primes (n = p
q), allows anyone to encrypt messages, while the private key, derived from the prime factors, decrypts them. This mathematical challenge ensures that only the intended recipient, who possesses the private key, can decrypt the message, providing confidentiality. Additionally, PGP employs elliptic curve cryptography (ECC), which leverages the algebraic structure of elliptic curves over finite fields, offering stronger security with shorter keys compared to traditional RSA, all grounded in advanced number theory.